import request from '@/axios'

export default {


  /**
   * 获取字典，无分页
   * @returns
   */
  getList(params = {}) {
    return request.request({
      url: 'agent/agent_user/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加字典类型
   * @returns
   */
  save(params = {}) {
    return request.request({
      url: 'agent/agent_user/save',
      method: 'post',
      data: params
    })
  },
  /**
   * 更新数据
   * @returns
   */
  update(id, params = {}) {
    return request.request({
      url: 'agent/agent_user/update/' + id,
      method: 'put',
      data: params
    })
  },

  /**
   * 更改字典类型状态
   * @returns
   */
  changeStatus(data = {}) {
    return request.request({
      url: 'agent/agent_user/changeStatus',
      method: 'post',
      data
    })
  },

  /**
  * 修改密码
  * @returns
  */
  modifyAccountInfo(id, data = {}) {
    return request.request({
      url: `agent/agent_user/modifyAccountInfo/${id}`,
      method: 'post',
      data
    })
  },
  /**
   * 用户更新个人资料
   * @returns
   */
  updateInfo(data = {}) {
    return request.request({
      url: 'agent/user/updateInfo',
      method: 'post',
      data
    })
  },

  /**
   * 用户修改密码
   * @returns
   */
  modifyPassword(data = {}) {
    return request.request({
      url: 'agent/user/modifypassword',
      method: 'post',
      data
    })
  },
}


